<%@page  import="javax.swing.JOptionPane" %>

<%@page  import="com.informet.ipd.modelo.dao.MainDao" %>

<%

          String pag = request.getParameter("num");

            String MM_authRestringidoURL = "restringido.jsp";

            boolean MM_grantRestringido = false;
            Object[] rest = (Object[]) session.getAttribute("restringir");
 
             Object  nuevo = (new MainDao().getCampo("select menu_id from permisos where rol_id=" + rest[0] + " and menu_id=" + pag));
             
            if (!nuevo.equals("null")) {
                MM_grantRestringido = true;
            }

         
                if (!MM_grantRestringido) {
                    response.sendRedirect(response.encodeRedirectURL(MM_authRestringidoURL));

             
            }

%>